<template>
	<view class="maintainStore">
		<view class="header">
			<navigator delta="1" open-type="navigateBack" class="return">
				<image src="../../static/image/fanhui1@3x.png" mode="widthFix" style="width: 70rpx;"></image>
			</navigator>
		</view>
		<view class="timer-address">
			<text class="title">{{store.shopName}}</text>
			<view class="image">
				<image src="../../static/image/manxing@3x.png" mode="widthFix"></image>
				<image src="../../static/image/manxing@3x.png" mode="widthFix"></image>
				<image src="../../static/image/manxing@3x.png" mode="widthFix"></image>
				<image src="../../static/image/manxing@3x.png" mode="widthFix"></image>
				<text class="score">4.8</text>
				<text class="order">总订单</text>
				<text class="number">369</text>
			</view>
			<view class="working">
				<image src="../../static/image/yingye@3x.png" mode="widthFix"></image>
				<text>营业中 8.30 - 19.00</text>
			</view>
			<view class="address">
				<view class="text">
					<text class="text1">{{store.shopAddress}}</text>
					<text class="text2">距离您 2.3km，驾车 8 分钟</text>
				</view>
				<view class="navButton">
					<image src="https://z3.ax1x.com/2021/04/19/cTUBWT.png" mode="widthFix"></image>
				</view>
			</view>
		</view>
		<view class="line">
			<image src="https://i.loli.net/2021/04/15/Mx8YJGfj25rAUWl.png" mode="widthFix"></image>
		</view>

		<view class="washCar">
			<view class="washCarTips">
				<text class="title">保养项目</text>
				<view class="book">
					<image src="../../static/image/shouce@3x.png" style="width: 20rpx;" mode="widthFix" />
					<text>保养手册</text>
				</view>
			</view>
			<view class="item">
				<view class="radioBox">
					<label class="radio">
						<radio value="" /><text></text>
					</label>
					<view class="saleCount">
						<text style="font-size: 30rpx; font-weight: bold;">机油</text>
						<text style="font-size: 24rpx; color: #999999;">评价 4.8 已售 369</text>
					</view>
				</view>
				<view class="price-icon">
						<text style="font-size: 30rpx; font-weight: bold; color: #ff5300;">￥320</text>
				</view>
			</view>
			<view class="item">
				<view class="radioBox">
					<label class="radio">
						<radio value="" checked="true" /><text></text>
					</label>
					<view class="saleCount">
						<text style="font-size: 30rpx; font-weight: bold;">机油滤清器</text>
						<text style="font-size: 24rpx; color: #999999;">评价 4.8 已售 369</text>
					</view>
				</view>
				<view class="price-icon">
						<text style="font-size: 30rpx; font-weight: bold; color: #ff5300;">￥54</text>
				</view>
			</view>
			<view class="item">
				<view class="radioBox">
					<label class="radio">
						<radio value="" /><text></text>
					</label>
					<view class="saleCount">
						<text style="font-size: 30rpx; font-weight: bold;">空调滤清器</text>
						<text style="font-size: 24rpx; color: #999999;">评价 4.8 已售 369</text>
					</view>
				</view>
				<view class="price-icon">
						<text style="font-size: 30rpx; font-weight: bold; color: #ff5300;">￥80</text>
				</view>
			</view>
		</view>
		<view class="balance">
			<view class="price">￥25</view>
			<navigator url="/pages/home/order" class="button">预定</navigator>
		</view>
	</view>
</template>

<script>
	import HomeStore from "../../components/homeStore/HomeStore.vue"
	//vuex
	import {
		createNamespacedHelpers
	} from "vuex";
	let {
		mapState,
		mapActions,
		mapMutations
	} = createNamespacedHelpers(
		"home"
	);
	export default {
		components: {
			HomeStore
		},
		data() {
			return {

			};
		},
		computed:{
			...mapState(['store'])
		},
		onLoad(option) {
			console.log(option);
			this.getStoreDetail({
				shopId: option.shopId
			})
		},
		methods: {
			...mapActions(["getStoreDetail"])
		}
	}
</script>

<style lang="scss" scoped>
	.maintainStore {
		background-color: #f9f9f9;
		position: relative;

		.header {
			height: 488rpx;
			background: url('https://i.loli.net/2021/04/12/69rQMx1GFWNw7EY.png');
			background-size: 100vw;
			background-position: 10px;

			.return {
				padding: 60rpx 24rpx;
			}
		}

		.timer-address {
			// width: 100vw;
			background-color: #FFFFFF;
			border-radius: 24rpx;
			margin: 24rpx;
			padding: 24rpx;
			position: absolute;
			top: 400rpx;


			.title {
				font-size: 32rpx;
				color: #333333;
				font-weight: bold;
			}

			.image {
				margin: 24rpx 0;

				image {
					width: 30rpx;
					margin: 0 8rpx 0 0;
				}

				.score {
					color: #f26200;
					font-size: 24rpx;
				}

				.order {
					font-size: 24rpx;
					color: #999999;
					margin: 0 20rpx 0 30rpx;
				}

				.number {
					font-size: 24rpx;
					color: #999999;
				}
			}

			.working {
				font-size: 20rpx;
				color: #999999;
				display: flex;
				align-items: center;

				image {
					width: 30rpx;
					margin-right: 10rpx;
				}
			}

			.address {
				padding: 48rpx 24rpx;
				border-radius: 20rpx;
				background-color: #f9f9f9;
				display: flex;
				justify-content: space-between;

				.text {
					display: flex;
					flex-direction: column;
					justify-content: space-between;

					.text1 {
						font-size: 24rpx;
						color: #333333;
						margin-bottom: 20rpx;
					}

					.text2 {
						font-size: 22rpx;
						color: #999999;
					}
				}

				.navButton {

					image {
						width: 60rpx;
						margin: 0 16rpx 0 60rpx;
					}
				}
			}
		}

		.line {
			margin-top: 360rpx;
			text-align: center;
		}

		.washCar {
			padding: 24rpx;
			margin: 200rpx 24rpx;
			background-color: #FFFFFF;
			border-radius: 20rpx;
			.washCarTips {
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin: 20rpx 0;
				.title {
					font-size: 30rpx;
					font-weight: bold;
				}
				.book {
					font-size: 20rpx;
				}
			}
			
			.item {
				display: flex;
				justify-content: space-between;

				.radioBox {
					display: flex;

					.radio {
						margin-right: 26rpx;

						radio {
							// width: 10rpx;
							scale: 0.6
						}
					}

					.saleCount {
						display: flex;
						flex-direction: column;
					}
				}


				.price-icon {

				}
			}
		}
		.balance {
			padding: 24rpx 0 0 24rpx;
			background-color: #FFFFFF;
			border-radius: 20rpx 20rpx 0 0;
			position: fixed;
			bottom: 0;
			width: 100%;
			height: 124rpx;
			box-sizing: border-box;
			display: flex;
			justify-content: space-between;

			.price {
				font-size: 48rpx;
				color: #ff5300;
				font-weight: bold;
				line-height: 100rpx;
			}

			.button {
				background-color: #ff7010;
				color: white;
				width: 236rpx;
				height: 100rpx;
				font-size: 32rpx;
				line-height: 100rpx;
				border-radius: 0 20rpx 0 0;
				text-align: center;
			}

		}
	}
</style>
